﻿using Baidu.Push.Api.Response;
using Baidu.Push.Api.Util;
using System;
using System.Collections.Generic;
using System.Text;

namespace Baidu.Push.Api.Request
{
    /// <summary>
    /// 查询离线消息的个数。
    /// </summary>
    public class FetchMsgCountRequest : IPushRequest<FetchMsgCountResponse>
    {
        public string UserId { get; set; }

        #region IPushRequest

        public string GetApiName()
        {
            return "fetch_msgcount";
        }

        public IDictionary<string, string> GetParameters()
        {
            PushDictionary parameters = new PushDictionary();
            parameters.Add("user_id", this.UserId);
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateRequired("user_id", this.UserId);
        }

        #endregion
    }
}
